use "C:\Users\CROP-IT03A\Dropbox\Korea Japan threat\2017Jan15_USPACOM_MovieExperiment.dta", clear

**variable construction (group 1:control, group 2:treatment)
label variable group "Japan-ROK Air Movie" 

//socioeconomic
gen male = q1 
label variable male "Male"
gen college = 0 
replace college=1 if q3==4 
label variable college "College Education"

//political opinion
gen pol_interest = 0
replace pol_interest=1 if q5==4 
replace pol_interest=1 if q5==3 
label variable pol_interest "High Political Interest"
gen Abe_support = q6
label variable Abe_support "Support Abe"
gen LDP_support = q7
replace LDP_support = 0 if q7>1
label variable LDP_support "Support LDP"
gen pol_right = q8
label variable pol_right "Politically Right"

//key question
label variable q10_1 "Stronger Claim Takeshima"
label variable q10_2 "More Economic Cooperation"
label variable q10_3 "More Security Cooperation"
label variable q10_4 "Case by Case Cooperation"
label variable q10_5 "More Envi. Protection Cooperation"
label variable q10_6 "More Disaster Prevention Cooperation"

label variable q11_1 "Turn into ROK on Confort Women"
recode q11_1 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q11_2 "More Students from ROK"
recode q11_2 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q11_3 "More Compaies from ROK"
recode q11_3 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q11_4 "Takeshima issue should be settled by ICJ"
recode q11_4 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q11_5 "Power Parity with ROK"
recode q11_5 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q11_6 "Turn into ROK on Takeshima"
recode q11_6 (1=5)(2=4)(3=3)(4=2)(5=1)

label variable q18_1 "JSDF with US Should Help ROK"
recode q18_1 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q18_2 "JSDF Should Do Back Theater Support for ROK"
recode q18_2 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q18_3 "JSDF Should Not Help ROK"
recode q18_3 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q18_4 "Japan Should only Devote to its Defense"
recode q18_4 (1=5)(2=4)(3=3)(4=2)(5=1)
label variable q18_5 "Japan Should Share Military Info. with ROK"
recode q18_5 (1=5)(2=4)(3=3)(4=2)(5=1)


**analysis (agree=5; disagree=1)

sort group

ttest q10_1, by(group) w
ttest q10_2, by(group) w
ttest q10_3, by(group) w
ttest q10_4, by(group) w
ttest q10_5, by(group) w
ttest q10_6, by(group) w

ttest q11_1, by(group) w
ttest q11_2, by(group) w
ttest q11_3, by(group) w
ttest q11_4, by(group) w
ttest q11_5, by(group) w
ttest q11_6, by(group) w


ttest q13_2, by(group) w
ttest q13_1, by(group) w
ttest q13_3, by(group) w
ttest q13_4, by(group) w

ttest q14_2, by(group) w
ttest q14_1, by(group) w
ttest q14_3, by(group) w
ttest q14_4, by(group) w

ttest q18_1, by(group) w
ttest q18_2, by(group) w
ttest q18_3, by(group) w
ttest q18_4, by(group) w
ttest q18_5, by(group) w

ttest q19_1, by(group) w
ttest q19_2, by(group) w

**calculation for MC
tab q10_1 group, col
tab q10_2 group, col
tab q10_3 group, col
tab q10_4 group, col
tab q10_5 group, col
tab q10_6 group, col
tab q18_1 group, col
tab q18_2 group, col
tab q18_3 group, col
tab q18_4 group, col
tab q18_5 group, col

**analysis using regression models
cor group male college pol_interest pol_right Abe
sum group male college pol_interest pol_right Abe
reg q10_2 group male college pol_interest pol_right Abe
coefplot, drop(_cons) xline(0) xtitle("More Economic Cooperation") graphregion(color(white)) mlabel format(%9.2g) mlabposition(1)
graph export graph_Movie01.pdf, replace
reg q10_3 group male college pol_interest pol_right Abe
coefplot, drop(_cons) xline(0) xtitle("More Security Cooperation") graphregion(color(white)) mlabel format(%9.2g) mlabposition(1)
graph export graph_Movie02.pdf, replace
reg q10_4 group male college pol_interest pol_right Abe
coefplot, drop(_cons) xline(0) xtitle("Case by Case Cooperation") graphregion(color(white)) mlabel format(%9.2g) mlabposition(1)
graph export graph_Movie03.pdf, replace
reg q10_5 group male college pol_interest pol_right Abe
coefplot, drop(_cons) xline(0) xtitle("More Envi. Protection Cooperation") graphregion(color(white)) mlabel format(%9.2g) mlabposition(1)
graph export graph_Movie04.pdf, replace
reg q10_6 group male college pol_interest pol_right Abe
coefplot, drop(_cons) xline(0) xtitle("More Disaster Prevention Cooperation") graphregion(color(white)) mlabel format(%9.2g) mlabposition(1)
graph export graph_Movie05.pdf, replace
reg q18_3 group male college pol_interest pol_right Abe
coefplot, drop(_cons) xline(0) xtitle("Japan Should only Devote to its Defense") graphregion(color(white)) mlabel format(%9.2g) mlabposition(1)
graph export graph_Movie06.pdf, replace

